﻿using System;
using TechTalk.SpecFlow;
using FluentAssertions;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Support;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;

namespace DocProcessingWorkFlowScenarios
{
    [Binding]
    public class BBOSBrandingOnLoginPageSteps
    {

        [AfterScenario()]
        public void TearDown()
        {
            loginPage.TimeWait();
            loginPage.Close();
            loginPage.Dispose();
        }

        BBOS_LoginPage loginPage = new BBOS_LoginPage();

        [Given]
        public void Given_the_BBOS_URL_is_correct()
        {
            //BrowserUtility.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(4));
            //BrowserUtility.Current.Url.Contains("http://dev.nexdox.com/DocProcessingWorkflow/Session/New");
            loginPage.TimeWait();
            loginPage.BBOSurl();
        }

        [Given]
        public void Given_I_can_see_the_BBOS_Logo()
        {
            //BrowserUtility.Current.FindElement(By.XPath("html/body/div[1]/header/div[1]/h1/a/img"));
            loginPage.BBOSLogo();
         
        }

        [Given]
        public void Given_I_can_see_the_DST_logo()
        {
            //BrowserUtility.Current.FindElement(By.XPath("html/body/div[1]/header/div[2]/p/img"));
            loginPage.DSTLogo();
        }


        [Then]
        public void Then_the_BBOS_Login_page_is_displayed()
        {
            //loginPage.Close();
            //loginPage.Dispose();
            
            //BrowserUtility.Current.Close();
            //BrowserUtility.Current.Dispose();

            loginPage.LoginText();
        }
    }
}
